Python 3.6.4/win10 when using pip to install keras, an error occurred while installing the dependent PyYAML, win10keras
PS C:\Users\myjac\Desktop\simple-chinese-ocr> pip install kerasCollecting keras Downloading http://mirrors.aliyun.com/pypi/packages/68/89/58ee5f56a9c26957d97217db41780ebedca3154392cb903c3f8a08a52208/
two methods
1) if you do not upgrade the Keras version
Set K. image_data_format () = 'channels _ first'ReplaceK.image_dim_ordering() == 'th'
2) upgrade Keras to the latest version.
> Activate carnd-term1 // activate your conda environment, which is called carnd-term1
(Carnd-term1)> conda list // display packages installed in the current environment
(Carnd-term1)> pip
very long. However, if the code is now written in Keras, you can use the code simply by modifying the backend to TensorFlow. This will be a great impetus to the development of the community.2. How to install Keras and TensorFlow as back end A) Dependent installation Install h5py for model Save and load: [Python]? 1 pip Install H5pyThere are also some dependency
In the repository directory /keras-retinanet/ , execute thepip install . --user 后,出现错误:D:\GT;CD D:\jupyterworkspace\keras-retinanetd:\jupyterworkspace\keras-retinanet>pip Install. --userlooking in Indexes:https://pypi.tuna.tsinghua.edu.cn/simpleprocessing d:\jupyterworkspace\ Keras
Install first and say:
sudo pip install Keras
or manually installed:
Download: Git clone git://github.com/fchollet/keras.git
Upload it to the appropriate machine.
Install: CD to the Keras folder and run the Install command:
sudo python setup.py install
Keras in Theano, before learning
:
Model.train_on_batch (X_batch, Y_batch)
Model performance can be evaluated with just one line of code:
Loss_and_metrics = Model.evaluate (X_test, Y_test, batch_size=128)
or generate predictions for new data:
Classes = Model.predict (X_test, batch_size=128)
Building a question and answer system, an image classification model, a neural Turing, or any other model, is so fast. The idea behind deep learning is simple, so why should it be so painful to realize it?
third,
doesn't matter, just use the command: Pip install Keras. If it goes well, the system will help you install all the keras you need, including Theano.
Windows installation steps:
1, refer to my other blog post, install Theano, and test no problem.
2. Use Anaconda, and then enter the command window in command anaconda: Pip
Reference: Keras Chinese Handbook
Note: This installation has only a CPU-accelerated process and no GPU acceleration. 1. First install Linux recommended Ubuntu, version can choose 16.04. 2. Ubuntu Initial environment Settings (1) First system upgrade
>>>sudo APT Update
>>>sudo apt Upgrade (2) to install a Python-based development package
>>>sudo apt install-y python-dev python-pip python-nose gcc g++ git
Keras provides many common, prepared layer objects, such as the common convolution layer, the pool layer, and so on, which we can call directly through the following code:
# Call a conv2d layer
from Keras import layers
conv2d = Keras.layers.convolutional.Conv2D (filters,\ kernel_size
, \
strides= (1, 1), \
padding= ' valid ', \
...)
However, in practical applications, we often need to build some layer obje
this post records the steps to install Keras and uses TensorFlow to do the backend. (The system used is Ubuntu, see detailed configuration information). #1 Create a virtual environment
In order to keep the Python development environment tidy, virtual environments are essential.
First create a virtual environment:
Mkvirtualenv KERAS_TF #--python=python2.7 Specifies the python version used
Workon KERAS_TF
#2 Installing TensorFlowUbuntu 16.04 Instal
In order to learn Keras, first have to install good keras, but under Windows, Keras installation really will have a lot of problems. These two days go a lot of detours, finally installed Keras, is based on Theano, now record the installation process, perhaps to their own help.
1. Install Python
Website Download Python3
the latest> Activate Carnd-term1//activating your Conda environment, this environment of mine is called Carnd-term1(CARND-TERM1) > Conda list//show packages installed in the current environment(CARND-TERM1) > Pip uninstall Keras//Uninstall old version of Keras, Keras is installed using
("reticulate") if you had not already.Step 1: Installed Anaconda3 to C:/users/user/anaconda3 (from https://www.anaconda.com/download/)Step 2: Opened "Anaconda Prompt" from Windows Start menu. First, to ' Create an ' environment ' specifically for use with TensorFlow and Keras in R called ' Tf-keras ' with a 64-bit vers Ion of Python 3.5 I typed:Conda create-n Tf-keras
Recently in the study of data mining related knowledge, the class has mentioned keras related knowledge, under the class would like to build their own keras, helpless related information too little.
So he wrote this blog, for small white installation learning.
Keras is a deep learning framework based on Theano, designed to refer to torch, written in Python, is a
installation:
(1) Premise: The existing python3.5 or Anaconda 3.5
(2) Download: TENSORFLOW-0.12.0RC0-CP35-CP35M-WIN_AMD64.WHL, download something in a folder
(3) Enter the following command in the power Shell to implement the local installation:
pip install F:\DevResources\tensorflow_gpu-0.12.0rc0-cp35-cp35m-win_amd64.whl
(4) Verifying the installation
Under "All Programs" find "Python 3.5 64bit", a command window
was successful.Second, installation TensorFlowOpen Anaconda Prompt1. Upgrade Pip to the latest version:2. Create an environment named TensorFlow and install the Python3.5.2Conda Create--name TensorFlow python=3.5.2Enter Y, enter. After the installation is complete:3. Activate this environment: Activate TensorFlow4. Installing TensorFlowPip Install TensorFlowNote: To install TensorFlow in an environment that has just been created with the name TensorF
installation of Keras and Theano is relatively easy, there is no problem, so I will not say. About TensorFlow, online a lot of said with the source code to install, in fact, as long as the version of the correct choice to use the source of the installation, or very easy, so be sure to install with their own cuda and CUDNN version corresponding. For example, I installed Cuda 8.0 and CUDNN V5, according to TensorFlow's official website's instructions.
of cuDNN, decompress the package, and place the corresponding file in the corresponding folder under the cuda installation directory, the installation directory of cuda can be found by viewing the environment variables.
3. tensorflow-gpu Installation
Tensorflow installation is actually very simple
Supports cuda: Open cmd and enter pip install tensorflow-gpu
Cuda is not supported: Open cmd and enter pip
Some friends want to change PyPI source Mac No. The Pip folder is normal because you have to build it yourself.
In Terminal access directory: CD ~/
If you do not have a. pip folder, create the new folder, MkDir. Pip
Then create a new file in the. pip folder Touch pip.conf,Edit pip.conf file, write to Aliyun[Global
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.